import Vue from 'vue'
// 路由 1.引用路由
import VueRouter from 'vue-router'
// 请求 1.引用Resource
import VueResource from 'vue-resource'
import App from './App.vue'
import HelloWorld from './components/HelloWorld.vue'
import Home from './components/Home.vue'

Vue.config.productionTip = false
// 路由 2.关联
Vue.use(VueRouter)
// 请求 2.关联
Vue.use(VueResource)
// 路由 3.路由配置
const router = new VueRouter({
  routes:[
    {path:"/",component:Home},
    {path:"/helloworld",component:HelloWorld}
  ],
  mode:"history"//隐藏链接中的/#
})

new Vue({
  router,
  render: h => h(App)
}).$mount("#app")